// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init()
const db=cloud.database()

// 云函数入口函数
exports.main = async (event, context) => {
    //const about=event.about;
    const jobname=event.jobname;
    const joblocation=event.joblocation;
    const salary=event.salary;
    const need=event.need;
    const desc=event.desc;
    const showtime=event.showtime;
    const other=event.other;
    const belong=event.belong;

    return await db.collection("job_cache").add({
      data: {
       // about: about,
        jobname: jobname,
        joblocation: joblocation,
        salary: salary,
        need: need,
        desc: desc,
        showtime: showtime,
        other: other,
        belong: belong,
        create_time: new Date().getTime()
      }
    })
}